package com.itheima.service;

import com.itheima.Repository.UserRepository;
import com.itheima.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserRepository userRepository;
    public List<User> findAll(){
        //return (List<User>)this.userRepository.findAll();
        List<User> userList = new ArrayList<User>();
        for (int i=0;i<100;i++){
            userList.add(new User(i,"Tom-模拟"+i,"123"));
        }
        return userList;
    }

}
